$userName = "admin_test";
$password = "admin_test";
$address = "127.0.0.1";
$port = "1523";
$sid = "orcl";
$tablespaceName = $userName;
$datafilePath = "D:\apps\Oracle11\oradata\orcl\$tablespaceName.dbf";

<#

#>
$sqlQuery = @"
		set NewPage none
		set heading off
		set feedback off

		DROP user $userName cascade;

        DROP tablespace $tablespaceName including contents and datafiles;
        
        CREATE tablespace  $tablespaceName datafile '$datafilePath' size 500M autoextend on next 100M maxsize unlimited logging extent management local autoallocate  segment space management auto;

        CREATE user $userName identified by $userName default tablespace $tablespaceName temporary tablespace temp;

        GRANT connect,resource,dba to  $userName;

		exit
"@

$sqlQuery | sqlplus -silent " / as sysdba"